package com.castle.fortress.admin.goods.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
/**
 * 商品规格项目详情 实体类
 *
 * @author majunjie
 * @since 2021-11-25
 */
@Data
@ApiModel(value = "goodsOption对象", description = "商品规格项目详情")
public class GoodsOptionDto implements Serializable {
	private static final long serialVersionUID = 1L;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "唯一主键")
	@JsonProperty("id")
	private Long id;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "商品id")
	@JsonProperty("goodsId")
	private Long goodsId;
	@ApiModelProperty(value = "规格设置（存规格的id 会有多个）")
	@JsonProperty("specs")
	private String specs;
	@ApiModelProperty(value = "名称")
	@JsonProperty("name")
	private String name;
	@ApiModelProperty(value = "商品原价")
	@JsonProperty("productPrice")
	private String productPrice;
	@ApiModelProperty(value = "商品现价")
	@JsonProperty("marketPrice")
	private String marketPrice;
	@ApiModelProperty(value = "商品成本")
	@JsonProperty("costPrice")
	private String costPrice;
	@ApiModelProperty(value = "商品库存 -1 不限库存")
	@JsonProperty("stock")
	private String stock;
	@ApiModelProperty(value = "商品重量")
	@JsonProperty("weight")
	private String weight;
	@ApiModelProperty(value = "排序")
	@JsonProperty("sort")
	private Integer sort;
	@ApiModelProperty(value = "商品编码")
	@JsonProperty("goodsSn")
	private String goodsSn;
	@ApiModelProperty(value = "商品条码")
	@JsonProperty("productSn")
	private String productSn;
	@ApiModelProperty(value = "备注")
	@JsonProperty("remark")
	private String remark;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "创建者")
	@JsonProperty("createUser")
	private Long createUser;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "创建时间")
	@JsonProperty("createTime")
	private Date createTime;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "更新者")
	@JsonProperty("updateUser")
	private Long updateUser;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "更新时间")
	@JsonProperty("updateTime")
	private Date updateTime;
	@ApiModelProperty(value = "状态")
	@JsonProperty("status")
	private Integer status;
	@ApiModelProperty(value = "删除状态 YesNoEnum。 yes删除；no未删除")
	@JsonProperty("isDeleted")
	private Integer isDeleted;
	@ApiModelProperty(value = "创建者姓名")
	@JsonProperty("createUserName")
	private String createUserName;

}
